#include <corecrt.h>
#include <iostream>
#include <cstring>

int main(void)
{
    using namespace std;
    char firstname[20];
    char lastname[20];
    cout << "Enter your fist name: ";
    cin.getline(firstname, 20);
    cout << "Enter your last name: ";
    cin.getline(lastname, 20);
    strcat(lastname+strlen(lastname), ", ");
    firstname[strlen(firstname)] = '\0';
    int newlen1 = strlen(lastname);
    strcat(lastname+newlen1, firstname);
    cout << "\nHere's the information in a single string: ";
    lastname[strlen(lastname)] = '\0';
    cout << lastname << endl;
}